package com.summer.framework.api.feign.fallback.admin;

import com.summer.framework.api.feign.service.admin.UserApiService;
import com.summer.framework.common.entity.Users;
import com.summer.framework.common.entity.response.BooleanResponse;
import com.summer.framework.common.exception.admin.UserNameNotFoundException;
import lombok.Setter;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @auther: 杨杰
 * @date: 2019/5/13 14:06
 * @description:
 */
@Slf4j
@Component
public class UserApiServiceFallBack implements UserApiService {
    @Setter
    private Throwable cause;

    @Override
    public List<Users> list() {
        log.info("出现错误", cause);
        return null;
    }

    @Override
    public Users getUserByName(String userName) throws UserNameNotFoundException {
        log.info("出现错误", cause);
        return null;
    }

    @Override
    public BooleanResponse save(Users user) {
        return null;
    }
}
